package com.qq.supplier.service.impl;

import com.qq.supplier.entity.Car;
import com.qq.supplier.entity.CarIn;
import com.qq.supplier.entity.Order_info;
import com.qq.supplier.mapper.CarMapper;
import com.qq.supplier.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarServiceImpl implements CarService {

    @Autowired
    CarMapper carMapper;

    @Override
    public int addCar(Car car) {
        return carMapper.addCar(car);
    }

    @Override
    public List<Car> queryAll() {
        return carMapper.queryAll();
    }

    @Override
    public CarIn queryOne(String id) {
        return carMapper.queryOne(id);
    }

    @Override
    public int editCar(Car car) {
        return carMapper.editCar(car);
    }

    //车辆仓库主页  显示库存  查找主页面所有的数据
    @Override
    public List<CarIn> querys() {
        return carMapper.querys();
    }

    @Override
    public int addCarIn(Car car) {
        return carMapper.addCarIn(car);
    }

    @Override
    public CarIn select(Car car) {
        return carMapper.select(car);
    }

    @Override
    public int editCarIn(CarIn carIn) {
        return carMapper.editCarIn(carIn);
    }

    @Override
    public List<Order_info> selects(String brand, String type) {
        return carMapper.selects(brand,type);
    }

    //按季度和车辆类型查询车辆数
  /*  @Override
    public List<Car> selectCars(String carVar, Date carInDate) {
        return carMapper.SelectCars(carVar,carInDate);
    }

*/
}
